perm filename FOUR.DVI[CLS,LSP] blob sn#874728 filedate 1989-06-22 generic text, type T, neo UTF8
α↓≤;β⎇ TeX output 1989.06.22:1413↓$"2K`y
3
¬cmr10DraftJunβf22,1989πL14:13ε↓↓α≤∩?7≠"V⊃G
εcmbx10WX⊂orkingεDraftAmericanNationalStandardfor∀G:InformationεSystems|ProgrammingLanguage↓fpCommonεLispF↓Z'∨4.λInrtroOduction↓N80K`y

¬cmr10Editors:∩T0Revision:∧q5.11≡↓USIntroG≥ductionε↔≠"V

εcmbx104{1α*$"DraftJunβf22,1989πL14:13ε↓↓α≤5≠"V
εcmbx10CONTENTSα∧↓4{2εW*orkingβUUDraft|ProgrammingLanguageCommonLispβ↓$"DraftJunβf22,1989πL14:13ε↓↓α≤6≠"V∞ff
εcmbx10In=trouduction∩xExecutionβUUofcoG≥decanbeaccomplishedbyavqarietyofmeansrangingfromdirectxinterpretationβUUoftheliststructurerepresentingaprogramthroughcompilationxtoβUUmachinecoG≥de.∧qAnevqaluatorimplementationcanbG≥ebasedonanyofthesexstrategies.∧qTheβUUterm$':

εcmti10implicitβc}'ompilation∧→referstocompilationpG≥erformedduringxevqaluation.∧qTheβUUcompilerisautilitythattranslatescoG≥deintoanimplementation-xdepG≥endentβUUformthatmightbG≥erepresentedorexecutede∞ciently*.xConformingβUUcoG≥demustbestructuredsothatitsresultsandobservqablesideeectsxwillβUUbG≥ethesamewhetherornotimplicitcompilationtakesplace.xTheβUUnatureoftheproG≥cessingperformedduringcompilationisdiscussedinx\CompilationβUUSemantics".∧qF*ollowing\CompilationSemantics"isadiscussionofxtheβUUbG≥ehaviorof←t:		¬cmbx9compile-leandtheinterfacebG≥etweencompile-leandload.!TerminologyxTheβUUfollowingterminologyisusedinthissection.xTheβUUtermc}'onstant∧H-referstoaquotedorself-evqaluatingconstantoranobject∧H-thatxisβUUasubstructureofsuchaconstant,notanamed≡N		¬cmtt9(defconstant)constant.∧qSeex\Constants".xTheβUUtermsour}'ceβcode∧∃refersβUUtoobje}'cts∧'vrepresentingprogramssuitableforevqalua-xtion,βUUsuchasobje}'cts∧'vcreatedbyreadorbymacroexpansion.∧qcompile-leisnotxrequiredβUUtocreatesuchobje}'cts∧'vnortoinvokeread.xTheβUUtermc}'ompiledβcode∧∃isβUUusedtorefertoobje}'cts∧'vrepresentingcompiledpro-xgrams,βUUsuchasobje}'cts∧'vconstructedbyloadwhenappliedtoalecreatedbyxcompile-le.xTheβUUtermc}'oalesce∧∃isβUUdenedasfollows.∧qSuppG≥oseAandBaretwoquotedobje}'ctsxdenedβUUasquotedconstantsinthesourcecoG≥de,andthatA'andB'arethexcorrespG≥ondingβUUobje}'cts∧'vinthecompiledcode.∧qIfA'andB'areeqlbutAandBarexnotβUUeql,thenitissaidthatAandBhaveβUUbG≥eencoalescedbythecompiler.xThreeβUUdierentenvir}'onments∧'vrelevqanttocompilationaredistinguished:∧qthec}'om-xpilationβenvir}'onment,βUUtheevaluationenvir}'onment,andtheruntimeenvir}'onment.xTheβUUc}'ompilationβenvironment∧H-ismaintainedbythecompilerandisusedtoholdxdenitionsβUUtobG≥eusedbythecompiler;thecompilationenvironmentmightbG≥exseparateβUUfromtheevaluationβenvir}'onment.∧qTheevaluationenvir}'onment∧H-istherunxtimeβUUenvir}'onment∧H-oftheLispimagefromwhichthecompilerwasinvoked.∧qThexrunβtimeenvir}'onment∧H-isβUUtheenvironment∧H-inwhichtheprogrambG≥eingcompiledxwillβUUbG≥eexecuted.∧qItispermittedtoimplementthecompilationenvironmentasxtheβUUevqaluationenvironmentβUUoraspartofit.$α↓USIntroG≥ductionε4{3∧α$"DraftJunβf22,1989πL14:13ε↓↓α≤xTheβUUtermminimalβc}'ompilation∧→referstoactionsthecompilermusttakeatxcompileβUUtime.∧qTheseactionswillbG≥especiedlater.∩xTheβUUtermtoβpr}'ocess∧'vrefersβUUtodeterminingthetimeofevqaluationforaformc,xpG≥ossiblyβUUevqaluatingthatform∧→(ifrequired),andperformingminimalcompilation.xTheβUUtermfurtherβc}'ompilation∧→referstocompilationbG≥eyondminimalcompilation.xThatβUUis,proG≥cessingdoesnotimplycompletecompilation.∧qF*urthercompilationisxpG≥ermittedβUUtotakeplaceatruntime.xTheβUUtermc}'ompileβtime∧∃referstothedurationoftimethatthecompilerispro-xcessingβUUsourcecoG≥de.∧qAtcompiletime,onlythecompilationandevqaluationxenvir}'onments∧'vareβUUavqailable.xTheβUUtermc}'ompileβtimedenition∧→refersβUUadenitioninthecompilationenviron-xment.∧qF*orβUUexample,whencompilingale,thedenitionofafunctionmustbG≥exretainedβUUinthecompilationenvironmentβUUifitisdeclaredorproG≥claimedinline.xThisβUUdenitionmightnotbG≥eavqailableintheevaluationenvironment.xTheβUUtermrunβtime∧∃referstothedurationoftimethattheloaderisloadingxcompiledβUUcoG≥deorcompiledcodeisbeingexecuted.∧qAtruntime,onlytherunxtimeβUUenvir}'onment∧H-isavqailable.xTheβUUtermrunβtimedenition∧→refersβUUtoadenitionintheruntimeenvironment.xTheβUUtermrun-timeβc}'ompiler∧hreferstocompileorimplicitcompilation,forwhichxtheβUUcompilationandruntimeenvir}'onments∧'varemaintainedinthesameLispx(noteβUUthatinthiscasetheruntimeandevqaluationenvir}'onments∧'varethesame).xTheβUUtermc}'ompiler∧hreferstobG≥oththerun-timecompilerandcompile-le.!Compilation¬≤Seman=ticsxConceptually*,βUUcompilationisaproG≥cessthattraversesβUUcode,performscertainkindsxofβUUsyntacticandsemanticanalysesusinginformation(suchasproG≥clamationsxandβUUmacr}'oβdenitionspresentinthecompiletimeenvironment),andproG≥ducesxmoG≥diedβUUcode.xTheβUUcompilermustpG≥erformthefollowingactions,referredtoasminimalβc}'ompila-xtionc:!",

εcmsy10∂AllβUUmacr}'oβcallsappG≥earingascodelexicallywithinthecodebeingcom-piledβUUmustbG≥eexpandedatcompiletimeinsuchawaythattheywillnotβUUbG≥eexpandedagainatruntime.∧qmacroletandsymCbKol-macroletarereplacedβUUbyforms∧'vcorrespG≥ondingtotheirbodiesinwhichcallstolocalmacr}'os∧'vareβUUreplacedbytheirexpansions.∂TheβUUcompilermustproG≥cessload-time-vhalueformsthatappearlexically∨t4{4εW*orkingβUUDraft|ProgrammingLanguageCommonLisp¬⊂$"DraftJunβf22,1989πL14:13ε↓↓α≤withinβUUtheprogrambG≥eingcompiled.∧qInthecaseofcompiletheload-time-vhalueβUUformwillbG≥eevqaluatedatcompiletime,anditsresultwillbG≥eβUUtreatedasaconstantatruntime.∧qInthecaseofcompile-le,theload-time-vhalueβUUformwillbG≥eevqaluatedatloadtime.∩xAdditionalβUUconstraintsabG≥outtheconsistencyofthecompilationandruntimexenvironmentsβUUimplyadditionalsemanticconstraintsonconformingprogramsthatxareβUUintendedtobG≥ecompiled.∧qConformingprogramsobeyingtheseconstraintsxwillβUUhavethesamebG≥ehaviorwhetherevqaluatedorcompiled,andmaybG≥emorexpG≥ortable.∧qSomeβUUimplementationsmightimpG≥oselooserconstraintsornosuchxconstraintsβUUatall.xExceptβUUwherenoted,whenacompiletimeandaruntimedenitionaredierent,xanβUUerroroftypG≥e!p0J

εcmsl10error∧
mightbG≥esignalled.∧qInthiscase,itisimplementation-xdepG≥endentβUUwhichdenitionwillprevqailwithinthecompiledcoG≥de.xTheβUUfollowingaretheaforementionedsemanticconstraints:∂AnyβUUform∧→thatisalistβ
bG≥eginningwithasymbG≥olβ∀thatdoesnotnameadenedβUUmacr}'oβorspecialβform∧→isafunctioncall.∧q(ThisimpliesthatsetfmethoG≥dsβUUmustbeavqailableatcompiletime.)∂TheβUUdenitionofafunctionthatisdenedanddeclaredorproG≥claimedinlineβUUinthecompilationenvir}'onment∧H-willbG≥eretainedatruntime.∂WithinβUUanamedfunction,arecursivecalltoafunctionofthesamenameβUUreferstothesamefunction,unlessthatfunctionhasbG≥eendeclarednotinline.∂AβUUcalltoanamedfunctionthatisdenedinthesamelereferstothatβUUfunction,unlessthatfunctionhasbG≥eendeclarednotinline.∧qTheconsequencesβUUareunspG≥eciediffunctionsareredenedindividuallyatruntimeβUUormultiplydenedinthesamele.∂TheβUUargumentsyntaxandnumbG≥erofreturnvqaluesforallbuilt-inCom-monβUULispfunctionswillbG≥ethesameatruntimeasatcompiletime.∧qAllbuilt-inβUUCommonLispfunctionsareproG≥claimedinline.∂TheβUUargumentsyntaxandnumbG≥erofreturnvqaluesforallfunctionswhoseftypeβUUwasdeclaredatcompiletimewillremainthesameatruntime.∂ConstantsβUUdenedwithdefconstanCtinthecompilationenvir}'onment∧H-willretainβUUthesamevqalueatruntime.∧qAreferencetothenameofaconstantinβUUsourcecoG≥deisequivqalenttoareferencetoanobje}'ct∧H-eqltothevalueoftheβUUconstant.∂TypG≥eβUUdenitionsmadewithdeftCypKeordefstructinthecompilationenvir}'onment∧H-willβUUretainthesamedenitionatruntime.∧qClassesdened s↓USIntroG≥ductionε4{5ε≥$"DraftJunβf22,1989πL14:13ε↓↓α≤byβUUdefclassinthecompilationenvir}'onment∧H-willbG≥edenedatruntimetohaveβUUthesamesup}'erclasses∧'vandβUUsamemetaclass!.∪ThisβUUimpliesthatsubtyp}'e/supertype∧∃relationshipsβUUoftypG≥especierswillβUUnotchangebG≥etweencompiletimeandruntime.∧q(NotethatitispG≥ermissibleβUUforanunknowntyp}'e∧∃toappearinadeclarationatcompiletime,βUUthoughawarningmightbG≥eemittedinsuchacase.)∩∂TypG≥eβUUdeclarationspresentinthecompilationenvir}'onment∧H-accuratelydescribG≥eβUUthevqaluesofthecorrespondingvqariablesandfunctionsatruntime;βUUotherwise,theruntimebG≥ehavioroftheprogramisundened.∂AβUUfunction∧→denedintheevqaluationenvir}'onment∧H-mighthaveadierentdenitionβUUoradierentsignatur}'e∧∃atruntime,exceptinthesituationsexplicitlyβUUlistedabG≥ove.xConformingβUUprogramsshouldnotbG≥ewrittenusinganyadditionalassumptionsxabG≥outβUUconsistencybetweenβUUthecompilationandruntimeenvir}'onments!.xTheβUUpresenceofacalltoafunction∧→thatisnotdenedatcompiletimewillnotxcauseβUUanerrortobG≥esignalledatcompiletime.!File¬≤CompilationxTheβUUfunctioncompile-lepG≥erformscompilationofforms∧'vinalefollowingthexrulesβUUspG≥eciedin\CompilationSemantics",andproducesanoutputlethatcanxbG≥eβUUloadedwithload.xNormally*,βUUthetop-levelformsappG≥earinginalecompiledwithcompile-learexexecutedβUUonlywhentheresultingcompiledleisloaded,andnotwhentheleisxcompiled.∧qHowever,βUUsomeformsinthelemustbG≥eevqaluatedatcompiletimesoxtheβUUremainderofthelecanbG≥ebereadandcompiledcorrectly*.xTheβUUspG≥ecialformevhal-whencanbeusedtocontrolwhetheratop-level∧]formisxevqaluatedβUUatcompiletime,loadtime,orbG≥oth.∧qItispossibletospecifyanyofxthreeβUUsituationswithevhal-when,denotedbythesymbG≥ols:compile-toplevel,x:load-toplevel,βUUand:execute.∧qF*ortoplevelevhal-whenforms,:compile-toplevelxspG≥eciesβUUthatthecompilermustevqaluatethebodyatcompiletimeintheevqalu-xationβUUenvir}'onment,and:load-toplevelspG≥eciesthatthecompilermustarrangextoβUUevqaluatethebG≥odyβUUatloadtimeF*ornon-toplevelevhal-whenforms,:executexspG≥eciesβUUthatthebodymustbeexecutedintheruntimeenvir}'onment.xTheβUUbG≥ehaviorofthisconstructcanbemorepreciselyunderstoodintermsofaxmoG≥delβUUofhowcompile-leprocessesformsinaletobecompiled.∧qTherearetwoxproG≥cessingβUUmodes,called\not-compile-time"and\compile-time-too".xSuccessiveβUUformsarereadfromthelebythecompile-leinnot-compile-time≤α4{6εW*orkingβUUDraft|ProgrammingLanguageCommonLispπ*$"DraftJunβf22,1989πL14:13ε↓↓α≤xmoG≥de;βUUinthismode,compile-learrangesforformstobeevqaluatedonlyatloadxtimeβUUandnotatcompiletime.∧qWhencompile-leisincompile-time-toG≥omode,xformsβUUareevqaluatedbG≥othatcompiletimeandloadtime.∩xProG≥cessingβUUoftop-level∧]formsinthelecompilerisdenedasfollows:1.IfβUUtheformisamacrocall,itisexpandedandtheresultisproG≥cessedasβUUatop-level∧]forminthesameproG≥cessingmode(compile-time-tooornot-compile-time).∩2.IfβUUtheformisaprognform,eachofitsbG≥odyβUUforms∧'vissequentiallyproG≥cessedβUUasatop-level∧]forminthesameprocessingmode.3.IfβUUtheformisaloKcally%,macrolet,orsymCbol-macrolet,compile-leestablishesβUUtheappropriatebindingsandproG≥cessesthebodyformsasanβUUimplicittop-level∧]prognwiththosebindingsineect,inthesameproG≥cessingβUUmode.∧q(Notethatthisimpliesthatthelexicalenvir}'onmentinβUUwhichtop-level∧]formsareproG≥cessedisnotnecessarilythenulllexicalenvir}'onment.)4.IfβUUtheformisanevhal-whenform,itishandledaccordingtoFigure4{1.~ff↓↓Dpffpff↓→⊃
A6BVαZC|D∧ActionvMoQdeβfff↓Bλ⊂9zY*es6Y*esXv|␈
|∧ProG≥cessvcompile-time-toG≥o⊂9zNo6Y*esVαZY*es|Y*es∧ProG≥cessvcompile-time-toG≥o⊂9zNo6Y*esVαZY*es|No∧ProG≥cessvnot-compile-time⊂9zNo6Y*esVαZNo␈
|∧ProG≥cessvnot-compile-time⊂9zY*es6NoXv|␈
|∧Evqaluate⊂9zNo6NoVαZY*es|Y*es∧Evqaluate⊂9zNo6NoVαZY*es|No∧Discard⊂9zNo6NoVαZNo␈
|∧Discard↓Bpff↓↓↓↓D∩@Figureβ4{1.∧evhal-whenproKcessingColumnβUUAindicateswhether:compile-toplevelisspG≥ecied.∧qColumnBβUUindicateswhether:load-toplevelisspG≥ecied.∧qColumnCindicateswhetherβUU:executeisspG≥ecied.∧qColumnDindicateswhetherthecompilerisβUUincompile-time-toG≥omode.TheβUUActioncolumnspG≥eciesoneofthreeactions:ProQcess:∧qproG≥cessβUUthebodyasanimplicittop-levelprogninthespG≥eciedβUUmode.Ev\raluate:∧qevqaluateβUUthebG≥odyβUUasanimplicitprogninthedynamicexecutionβUUcontextofthecompiler,usingtheevqaluationenvir}'onmentasβUUtheglobalenvironmentβUUandthelexicalenvir}'onment∧H-inwhichthe←↓USIntroG≥ductionε4{7λ8o$"DraftJunβf22,1989πL14:13ε↓↓α≤evhal-whenβUUappG≥ears.∩Discard:∧qTheβUUformisdiscarded.5.Otherwise,βUUtheformisatop-level∧]formthatisnotoneofthespG≥ecialcases.∧qInβUUcompile-time-toG≥omode,thecompilerrstevqaluatestheformandβUUthenminimallycompilesit.∧qInnot-compile-timemoG≥de,theform∧→issimplyβUUminimallycompiled.∧qAllsubformsaretreatedasnon-top-levelforms.∩NoteβUUthattop-level∧]formsareproG≥cessedintheorderinwhichtheytextuallyβUUappG≥earinthele,andthateachtop-level∧]formreadbythecompilerβUUisproG≥cessedbeforethenextisread.∧qHowever,βUUtheorderofproG≥cessingβUU(includingmacroexpansion)ofsubformsthatarenottop-level∧]formsβUUandtheorderoffurthercompilationisunspG≥eciedaslongasCommonβUULispsemanticsarepreserved.xevhal-whenβUUformscausecompiletimeevqaluationonlyattop-level↓λ.∧qBoth:compile-xtoplevelβUUand:load-toplevelsituationspG≥ecicationsareignoredfornon-toplevelxforms.∧qF*orβUUnon-toplevelforms,anevhal-whenspG≥ecifyingthe:executesituationxwillβUUbG≥etreatedasifitwereaprognincludingtheformsinthebodyofthexevhal-when.xFigureβUU4{2listsmacrosthatmakedenitionsavqailablebG≥othinthecompilationxandβUUruntimeenvir}'onments!.∧qItisnotrequiredthatdenitionsmadeavqailablextoβUUthecompilerthiswayβUUbG≥emadeavqailableasifevaluatedbythecompilerinxtheβUUevqaluationenvir}'onment,norisitrequiredthatbG≥eavailableinsubsequentxcompilationβUUunitsorsubsequentinvoG≥cationsofthecompiler.∧qAswithevhal-when,xtheseβUUcompiletimesideeectshappG≥enonlywhenthedeningmacrosappearatxtop-level↓λ.Sx↓↓hEE↓@⊃defconstanCt≠dene-setf-methoKd↓⎇jdefsetf⊃defclass≠defmacro↓⎇jdefstruct⊃defgeneric≠defmethoKd↓⎇jdeftCypKe⊃dene-condition≠defpacCkhage↓⎇jdefvhar⊃dene-methoKd-comCbination≠defparameter↓⎇jin-pacCkhage⊃dene-moKdify-macro≠defproKclaim↓fE↓↓↓↓h∩@xFigureβ4{2.∧Deningmacros"Compiler/Loader¬≤In=terfacexTheβUUfunctionsevhalandcompilearerequiredtoinsurethatconstantsreferencedxwithinβUUtheresultinginterpretedorcompiledcoG≥deob8jectsareeqltothecor-xrespG≥ondingβUUob8jectsinthesourcecode.∧qcompile-le,ontheotherhand,mustxproG≥duceβUUanoutputlewhich,whenloadedwithload,constructstheobje}'cts←H4{8εW*orkingβUUDraft|ProgrammingLanguageCommonLisp	Dk$"DraftJunβf22,1989πL14:13ε↓↓α≤xdenedβUUbythesourcecoG≥deandproducesreferencestothem.∩xInβUUthecaseofcompile-le,obje}'cts∧'vconstructedbyloadoftheoutputlecannotxbG≥eβUUspokenofasbeingeqltoobje}'cts∧'vconstructedatcompiletime,becausethexcompiledβUUlemaybG≥eloadedintoadierentLispimagethantheoneinwhichitxwasβUUcompiled.∧qThissectiondenestheconceptofsimilarityβasc}'onstants∧'vwhichxrelatesβUUobje}'cts∧'vinthethecompiletimeenvironment∧H-tothecorrespG≥ondingobjectsxinβUUtheloadtimeenvir}'onment.xTheβUUconstraintsonconstantsdescribG≥edinthissubsectionapplyonlytocompile-xle;βUUevhalandcompilearenotpG≥ermittedtocopyorcoalesceconstants.!GConstan=tsxAnβUUobje}'ct∧H-canbG≥eusedasaquotedconstantprocessedbycompile-leifthexresultingβUUconstantestablishedbyloadingthecompiledleissimilarβasac}'onstantxtoβUUtheoriginal.xTheβUUnotionofsimilarityasaconstantisnotdenedonalltyp}'es!.∧qConformingximplementationsβUUarerequiredtohandlesuchobje}'cts∧'vbyhavingthecompilerandxloaderβUUreconstructanequivqalentcopyoftheobje}'ct∧H-insomeimplementation-xspG≥ecicβUUmanner,orbyhavingthecompilersignalanerroroftypG≥eerror.∧qAxconformingβUUpG≥ortableprogrammustnotuseobje}'cts∧'vofthesetypes∧'vasconstantsinxcoG≥deβUUtobeprocessedwithcompile-le.xTheβUUdenitionofsimilar∧hisintermsoftherelationshipofdissimilarity}.xTwoβUUobje}'cts∧'varedissimilarifandonlyiftheyarenoteqlandoneofthefollowingxholds:∧qtheyβUUarenotofthesametyp}'e[,theyareofthesametype∧∃butarenotxofβUUatyp}'e∧∃listedbG≥elow,ortheyareofthesametype∧∃andsatisfytheadditionalxrequirementsβUUlistedforthattypG≥easfollows:arra9y:∧qtheyβUUhavedierentdimensionsortheyhavethesamedimensionandsatisfyβUUwhicheverofthefollowingisappropriate:one-dimensionalβTarra9y:∧qtheβUUvqaluesofoneofthefollowingattributesareβUUdissimilar:∧qlength,arraCy-element-typKe,βUUandeltforallvqalidindices.m9ulti-dimensionalβTarray:∧qtheβUUvqaluesofoneofthefollowingattributesareβUUdissimilar:∧qarraCy-element-typKeandaref∧Z!forallvqalidindices.c9haracter:∧qtheyβUUrepresentdierentcharacterscons:∧qtheβUUvqaluesoftheirc}'ar∧hcompG≥onentsaredissimilarorthevaluesoftheirc}'dr∧hcompG≥onentsβUUaredissimilarhashβTtable:∧qeitherβUUtheyhaveβUUdierenttestsorforallone-to-onecorrespG≥on-"e↓USIntroG≥ductionε4{9
P$"DraftJunβf22,1989πL14:13ε↓↓α≤dencesβUUbG≥etweenthekeysofthetwotables,eitherthecorrespG≥ondingkeysaredissimilarβUUorthecorrespG≥ondingvqaluesaredissimilar.∩n9umbQer:∧qtheyβUUrepresentdierentmathematicalvqaluespac9k\rage:∧qtheirβUUnamesaredissimilarasstringspathname:∧qtheyβUUhaveacompG≥onentwhosevqaluesaredissimilarrandomβTstate:∧qtheyβUUproG≥ducedierentsequencesofnumbG≥erswhenrandomisβUUrepG≥eatedlyappliedtothemstring:∧qtheyβUUaredissimilarasarrayssym9bQol:∧qoneβUUofthemisinternedandtheyarenoteql,orbG≥othareunin-ternedβUUandtheirprintnamesaredissimilarasstringsxNoteβUUthattwoβUUobje}'cts∧'varedissimilarifthereisapG≥ointofdissimilaritybG≥etweenxthem.xTwoβUUob8jectsaresimilar∧hisandonlyiftheyarenotdissimilar↓∪.xIfβUUtwoconstantsappG≥earinginthesourcecodeforasingleleprocessedwithxcompile-leβUUareeql,thecorrespG≥ondingconstantsinthecompiledcodemustalsoxbG≥eβUUeql.∧qHowever,iftwoobje}'cts∧'vareeqlinthecompiledcoG≥de,thecorrespondingxobje}'cts∧'vinβUUthesourcecoG≥demightnothavebG≥eeneql.∧qcompile-leispermittedtoxcoalesceβUUconstantsappG≥earinginthesourcecodeiftheyaresimilarasconstants,xexceptβUUiftheobje}'cts∧'vinvolvedβUUareoftypG≥esymbG≥old,packqageg,orstructure.∧qObje}'ctsxofβUUthesetyp}'es∧'varenevercoalesced.∧qInaddition,thefollowingareconstraintsonxtheβUUhandlingofconstantsduringcompilationusingcompile-le:arra9y:∧qIfβUUanarray∧0inthesourcecoG≥deisasimple-arrayC,thenthecorrespG≥ond-ingβUUarray∧0inthecompiledcoG≥dewillalsobeasimple-arrayC.∧qIfthearray∧0inthesourceβUUcoG≥deisdisplaced,hasallβp}'ointer↓∪,orisadjustable,thecorrespondingarray∧0inβUUthecompiledcoG≥demightlackanyorallofthesequalities.∧qIfanarray∧0inβUUthesourcecoG≥dehasallpointer,thenthecorrespondingarray∧0intheβUUcompiledcoG≥demightbeonlythesizeimpliedbythellpointer.function:∧qIssueβUUCONST*ANT-FUNCTION-COMPILATIONspG≥ecieshowtheβUUcompilerandloaderhandleconstantfunctionsi}.hashβTtable:∧qTwoβUUhashβ&tablesβaresimilarifthereisaone-to-onecorrespG≥on-denceβUUbG≥etweenthekeysofthetwotablessuchthatthecorrespG≥ondingkeysandβUUvqaluesaresimilar.∧qIfthereismorethanonesuchone-to-onecorrespG≥on-denceβUUbG≥etweenthekeysofthetwotables,theconsequencesareunspG≥eciediftheβUUtablesarecoalesced.∧qConformingcoG≥detobeprocessedwithcompile-lemustβUUnotuseahash∧"tableβasaconstantifitisnotpG≥ossibletoconstructasimilarβUUtablewithmorethanonesuchone-to-onecorrespG≥ondencewiththeoriginal.←4{10εW*orkingβUUDraft|ProgrammingLanguageCommonLisp]n$"DraftJunβf22,1989πL14:13ε↓↓α≤pac9k\rages:∧qTheβUUloaderisrequiredtondthecorrespG≥ondingpackqageβob8jectasifβUUbycallingnd-pacCkhagewiththepackqagenameasanargument.∧qAnerrorofβUUtypG≥epackqage-error∧
issignalledifnopackqageβofthatnameexistsatloadtime.∩random-state:∧qAβUUconstantrandom-stateβob8jectcannotbG≥eusedasthestateβUUargumenttothefunctionrandombG≥ecauserandommodiesthisdatastructure.structure,βTstandard-object:∧qObje}'cts∧'vofβUUtypG≥estructureβandstandard-ob8jectmayβUUappG≥earincompiledconstantsifthereisanappropriatemakCe-load-formmethoG≥dβUUdenedforthattyp}'e[.compile-leβUUcallsmakCe-load-formonanyobje}'ct∧H-thatisreferencedasaconstantβUUorasaself-evqaluatingform,iftheobje}'ct'sβmetaclass∧'visstandard-classi},βUUstructure-class,anyuser-denedmetaclass∧'vthatisnotasub}'classofbuilt-in-classi},βUUoranyofapG≥ossiblyemptyimplementation-denedlistofothermetaclasses!.∧qcompile-leβUUwillcallmakCe-load-formonceforanygivenobje}'ctwithinβUUasinglele.sym9bQol:∧qIssueβUUCOMPILE-FILE-SYMBOL-HANDLINGdeneshowcompile-leβUUandtheloaderhandleinternedsymbG≥olsi}.!Compile¬≤TimeErrorHandlingxcompileβUUorcompile-learepG≥ermittedtoissueerrorsandwarnings,includingxerrorsβUUduetocompile-timeproG≥cessingof(eval-when∧(:compile-toplevel)...)xforms,βUUmacroexpansion,andconditionssignalledbythecompileritself.xConditionsβUUoftypG≥eerror∧
mightbG≥esignalledbythecompilerinsituationswherextheβUUcompilationcannotproG≥ceedwithoutintervention.xInβUUadditiontosituationsforwhichthestandardspG≥eciesthatconditionsoftypG≥exwarning∧0mustβUUormightbG≥esignalled,warningsmightbG≥esignalledinsituationsxwhereβUUthecompilercandeterminethattheresultshaveβUUundenedconsequencesxorβUUthataruntimeerrorwillbG≥esignalled.∧qExamplesofthissituationareasxfollows:∧qviolatingβUUtypG≥edeclarations,alteringorassigningthevqalueofaconstantxdenedβUUwithdefconstanCt,callingbuilt-inLispfunctionswithawrongnumbG≥erβUUofxargumentsβUUormalformedkeywordargumentlists,referencingavqariabledeclaredxignore,βUUandusingunrecognizeddeclarationspG≥eciers.xTheβUUcompilerispG≥ermittedtoissuewarningsaboutmattersofprogrammingstylexasβUUconditionsoftypG≥estyle-warningC.∧qExamplesofthissituationareasfollows:xredeningβUUafunctionusingadierentargumentlist,callingafunctionwithaxwrongβUUnumbG≥erofarguments,notdeclaringignoreofaloG≥calvqariablethatisnotxreferenced,βUUandusingdeclarationspG≥eciersdescribedinthestandardbutignored!q↓UIntroG≥ductionε4{11ks$"DraftJunβf22,1989πL14:13ε↓↓α≤xbyβUUthecompiler.∩xBothβUUcompileandcompile-leareallowedβUUtoestablishadefaultconditionhan-xdler.∧qIfβUUsuchaconditionhandlerisinvoked,itmustrstresignaltheconditionxtoβUUallowuser-establishedhandlerstohandleit.∧qIfallerrorhandlersdecline,thexdefaultβUUhandlermayhandletheconditioninanimplementation-spG≥ecicway*.xSomeβUUwarningsmightbG≥edeferreduntiltheendofcompilation.∧qSeewith-xcompilation-unit.↓≤s4{12εW*orkingβUUDraft|ProgrammingLanguageCommonLispx↓≤;βαX"α|ε7≠"V⊃G
εcmbx106≠"V∞ff
εcmbx105≠"V
εcmbx102K`y
3
¬cmr10$':

εcmti10!p0J

εcmsl10≡N		¬cmtt9←t:		¬cmbx9↔≠"V

εcmbx10!",

εcmsy10K`y

¬cmr10{α